package day03;

import java.math.BigDecimal;
import java.util.Scanner;

public class IfDemoo {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        System.out.println("请输入商品的价格");
        int price=scan.nextInt();
        BigDecimal bigDecimal=new BigDecimal(price);
        if(bigDecimal.compareTo(new BigDecimal(500))>0){
            price*=0.7;
            System.out.println("打折后的价格为："+price);

        }

    }

}
